/**
 * @desc 用户管理
 * @date 2023-07-05
 */
// 表头
const tableColumnData = [
  {
    label: '登录名称',
    prop: 'loginName',
    tooltip: true,
  },
  {
    label: '用户名称',
    prop: 'viewName',
    tooltip: true,
  },
  {
    label: '启用状态',
    prop: 'state',
    tooltip: true,
  },
]
const formRow = [
  {
    elCol:[{
      label:'登录名称',
      prop:'loginName',
      tag:'elInput',
    },{
      label:'登录密码',
      prop:'password',
      tag:'password',
    }]
  },
  {
    elCol:[{
      label:'用户编码',
      prop:'memberCode',
      tag:'elInput',
    },{
      label:'用户姓名',
      prop:'viewName',
      tag:'elInput',
    }]
  },
  {
    elCol:[{
      label: '状态',
      prop: 'state',
      tag: 'elRadio',
      options: [
        { label: '启用', value: '1' },
        { label: '停用', value: '0' }
      ]
    }]
  },
]

const formRow1 = [
  {
    elCol:[{
      label:'登录名称',
      prop:'loginName',
      tag:'elInput',
      disabled:true,
      span:24
    }]
  },
  {
    elCol:[{
      label:'用户编码',
      prop:'memberCode',
      tag:'elInput',
    },{
      label:'用户姓名',
      prop:'viewName',
      tag:'elInput',
    }]
  },
  {
    elCol:[{
      label: '状态',
      prop: 'state',
      tag: 'elRadio',
      options: [
        { label: '启用', value: '1' },
        { label: '停用', value: '0' }
      ]
    }]
  },
]
const formRowShow = [
  {
    elCol:[{
      label:'登录名称',
      prop:'loginName',
      tag:'elInput',
      disabled:true,
      span:24
    }]
  },
  {
    elCol:[{
      label:'用户编码',
      prop:'memberCode',
      tag:'elInput',
      disabled:true
    },{
      label:'用户姓名',
      prop:'viewName',
      tag:'elInput',
      disabled:true
    }]
  },
  {
    elCol:[{
      label: '状态',
      prop: 'state',
      tag: 'elRadio',
      disabled:true,
      options: [
        { label: '启用', value: '1' },
        { label: '停用', value: '0' }
      ]
    }]
  },
]

const basicsRules ={
  loginName:[{
    required: true,
    message: '请输入登录名称',
    trigger: 'blur'
  }],
  password:[{
    required: true,
    message: '请输入登录密码',
    trigger: 'blur'
  }],
  memberCode:[{
    required: true,
    message: '请输入用户编码',
    trigger: 'blur'
  }],
}
export default {
  tableColumnData,
  formRow,
  basicsRules,
  formRow1,
  formRowShow
}